home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 136_01 / tz2.c < prev    next >
Text File  |  1980-01-01  |  9KB  |  407 lines

  1. /*    HEADER:  CUG136.02;
  2.     TITLE:        TZ-Part 2;
  3.     VERSION:    0.29;
  4.     DATE:        3/12/1986;
  5.     SYSTEM:        CP/M,MS-DOS,TOS;
  6.     FILENAME:    TZ2.C;
  7.     AUTHORS:    R. Rodman;
  8.     COMPILERS:    C/80,Aztec,Alcyon;
  9. */
  10.  
  11. /* TZ2.C - Miscellaneous parts of TZ game.
  12.     860311 rr removed from TZ.C
  13.     860319 rr add st extra delay, message */
  14.  
  15. extern int rm_num, nu_fl, cratct, beerct, wtchct, pushct, pushfl, noun;
  16. extern int answer[ 5 ];
  17.  
  18. extern print();
  19.  
  20. hello()
  21. {
  22.     print( "*You unlock this door with the key of imagination." );
  23.     ilpdel();
  24.     print( "\\Beyond it is another dimension..." );
  25.     ilpdel();
  26.     print( "\\    ...a dimension of sound..." );
  27.     ilpdel();
  28.     print( "\\       ...a dimension of sight..." );
  29.     ilpdel();
  30.     print( "\\          ...a dimension of mind..." );
  31.     ilpdel();
  32.     print( "^You're moving into a land of both shadow and substance..." );
  33.     ilpdel();
  34.     print( "\\    ...of things and ideas..." );
  35.     ilpdel();
  36.     print( "\\    ...You've just crossed over..." );
  37.     ilpdel();
  38.     print( "\\\\          ...into the Twilight Zone." );
  39. }
  40.  
  41. /* Long Delay */
  42.  
  43. ilpdel()
  44. {
  45.     int k;
  46.     for( k = 1; k <= 30000; k++ );
  47. #ifdef ST
  48.     for( k = 1; k <= 30000; k++ );
  49.     for( k = 1; k <= 30000; k++ );
  50. #endif
  51. }
  52.  
  53. /* Examine Bed */
  54.  
  55. exbed()
  56. {
  57.     print( "^What are beds for?" );
  58. }
  59.  
  60. /* Marsh */
  61.  
  62. pool()
  63. {
  64.     print( "^You see yourself looking down into the pool..." );
  65.     print( " Could it mean that YOU are the MARSH-IAN?" );
  66. }
  67.  
  68. echh()
  69. {
  70.     print( "^ECHH! Tastes AWFUL!" );
  71. }
  72.  
  73. /* Phone Booths */
  74.  
  75. busy()
  76. {
  77.     print( "^The phone is busy." );
  78. }
  79.  
  80. call7()
  81. {
  82.     rm_num = 7;
  83.     nu_fl = 1;
  84. }
  85.  
  86. call11()
  87. {
  88.     rm_num = 11;
  89.     nu_fl = 1;
  90. }
  91.  
  92. sign()
  93. {
  94.     print( "^'No dime needed to call operator'." );
  95. }
  96.  
  97. book()
  98. {
  99.     print( "^'Let your fingers do the walking ...'" );
  100. }
  101.  
  102. /* Safe (a Red Herring) */
  103.  
  104. opsafe()
  105. {
  106.     print( "^It's locked.If you knew the combination,you" );
  107.     print( " could dial it." );
  108. }
  109.  
  110. dlcomb()
  111. {
  112.     print( "^The heavy steel door of the safe swings open," );
  113.     print( " revealing...nothing,save a small piece of paper." );
  114. }
  115.  
  116. paper( r )
  117. int r;
  118. {
  119.     switch( r ) {
  120.         case 86 :
  121. print( "^The paper says simply,'Combination: 22-41-66.'" );
  122.             break;
  123.         case 152 : print( "^'Thought it would be that easy?'" );
  124.             break;
  125.         default : cant();
  126.     }
  127. }
  128.  
  129. form()
  130. {
  131.     print( "^The Racing Form is a newspaper-like publication" );
  132.     print( " which lists local horse races and shows calculated" );
  133.     print( " odds on each horse.Gamblers often read these" );
  134.     print( " before placing bets." );
  135.     print( "\\There is an inkblot on this form,which appears" );
  136.     print( " to have inadvertantly dripped from the pen." );
  137. }
  138.  
  139. blot()
  140. {
  141.     print( "^It looks like a crab,or maybe,..." );
  142.     print( "\Anyway,the blot has landed next to a horse" );
  143.     print( " in the third race named 'Royal _3'.Might be a " );
  144.     print( "good bet!" );
  145. }
  146.  
  147. /* Mirrors */
  148.  
  149. seeslf()
  150. {
  151.     print( "^You see yourself standing in the hotel room." );
  152. }
  153.  
  154. seecow()
  155. {
  156.     print( "^You see yourself standing in the hotel room --" );
  157.     print( " but dressed up in dusty Old West clothing!" );
  158. }
  159.  
  160. mirhse( i )
  161. int i;
  162. {
  163.     print( "^You see yourself in a state of" );
  164.     switch( i ) {
  165.         case 223 : print( " confidence." ); break;
  166.         case 224 : print( " frustration." ); break;
  167.         case 225 : print( " thought." ); break;
  168.         case 226 : print( " indecision." ); break;
  169.         case 227 : print( " desperation." ); break;
  170.         case 228 : print( " anxiety." ); break;
  171.         case 229 : print( " reflection." ); break;
  172.         case 230 : print( " agitation." ); break;
  173.         case 231 : print( " surprise!" ); break;
  174.     }
  175. }
  176.  
  177. menu( r )
  178. int r;
  179. {
  180.     switch( r ) {
  181.         case 9 : print( "^'House Specialties:" );
  182. print( "\\Spare Ribs ...6.98     Red Herring ...5.00" );
  183. print( "\\Food for Thought:" );
  184. print( " You must find something in this world and take" );
  185. print( " it somewhere.Watch for clues as to what it is." );
  186. print( " Remember,Information is the most valuable of" );
  187. print( " all possessions.'" );
  188.             break;
  189.         case 221 : print( "^'House Specialties:" );
  190. print( "\\Spare Ribs ...6.98    Blue Trout ...2.65" );
  191. print( "\\Food for Thought: Read the Plate." );
  192.             break;
  193.         default: print( "^Don't see one here." );
  194.     }
  195. }
  196.  
  197. drwatr()
  198. {
  199.     print( "^Ahh...you were getting thirsty!" );
  200. }
  201.  
  202. /* Crate */
  203.  
  204. excrat()
  205. {
  206.     if (cratct == 0 )
  207.         print( "^It looks as though it could be opened..." );
  208.     else {
  209.         print(  "^Very odd indeed! The crate has a smaller" );
  210.         print( " crate inside it ...\\within that one is a" );
  211.         print( " ...wax hand? Maybe part of a statue?" );
  212.     }
  213. }
  214.  
  215. opcrat()
  216. {
  217.     if( ++cratct > 1 )
  218.         print( "^It's already open!" );
  219.     else
  220.         print( "^"); 
  221. }
  222.  
  223. writing( r )
  224. int r;
  225. {
  226.     switch( r ) {
  227.         case 21 : print( "^'Buy a beer at the saloon.'" );
  228.             break;
  229.         case 29 : inst(); break;    
  230.         case 214 : print( "^'The Twilight Zone Game is" );
  231.             print( " Copyright (C) 1982,1983 by R.Rodman.'" );
  232.             break;
  233.         default : print( "^Don't see any." );
  234.     }
  235. }
  236.  
  237. inst()
  238. {
  239.     print( "^'The key to the Zone is a multi-digit code.Once having" );
  240.     print( " determined it,you may leave the Zone if you use it in" );
  241.     print( " the proper way.Be careful not to disclose it to the" );
  242.     print( " wrong person!'" );
  243. }
  244.  
  245. /* Buy Beer */
  246.  
  247. buyber()
  248. {
  249.     switch( ++beerct ) {
  250.         case 1 :
  251.             print( "^You strike up a conversation with the" );
  252.             print( " bartender.\'Let me give you a hint,' he" );
  253.             print( " says.'When you get to Centerville," );
  254.             print( " take a ride on the train.'" );
  255.             print( " He then goes back to washing glasses." );
  256.             break;
  257.         default :
  258.             print( "^Without saying a word,he slides a glass" );
  259.             print( " of beer over to you." );
  260.     }
  261. }
  262.  
  263. drbeer()
  264. {
  265.     print( "^Ahh...Really hits the spot!" );
  266. }
  267.  
  268. ridhor()
  269. {
  270.     print( "^The horse won't go anywhere,no matter what you do." );
  271. }
  272.  
  273. taktrn()
  274. {
  275.     print( "^The train pulls up and you get on.It rolls out and" );
  276.     print( " travels past the Centerville water tower.Then,it" );
  277.     print( " rolls past five abandoned automobiles.The second one" );
  278.     print( " looks like an old race car; it is painted a strange" );
  279.     print( " _2 color,and on it is a number 6." );
  280.     print( " The train continues past some cornfields" );
  281.     print( " and crosses the gravel road entering Centerville." );
  282.     print( " Finally,it arrives back at the station again." );
  283. }
  284.  
  285. taknot()
  286. {
  287.     print( "^You can't take it with you." );
  288. }
  289.  
  290. /* Read License Plates */
  291.  
  292. plates( i )
  293. int i;
  294. {
  295.     switch( i ) {
  296.         case 9 :
  297.         case 221 :
  298. print( "^There is nothing written on it.Perhaps a different kind of plate" );
  299. print( " might prove more interesting!" );
  300.             break;
  301.         case 205 : print( "^'B46 317'." ); break;
  302.         case 206 : print( "^'GJJ-165'." ); break;
  303.         case 207 : print( "^'301 BFJ'." ); break;
  304.         case 208 : print( "^'SQR-602'." ); break;
  305.         case 209 : print( "^'F65-G37'." ); break;
  306.         case 210 : print( "^'1225348'." ); break;
  307.         case 211 : print( "^'421 JK'." ); break;
  308.         case 212 : print( "^'JKL-123'." ); break;
  309.         case 213 : print( "^'DIGIT 5'." ); break;
  310.         default : cant(); break;
  311.     }
  312. }
  313.  
  314. opgrat()
  315. {
  316.     print( "^Oh boy! Maybe there's a stairway leading to a" );
  317.     print( " dome,and a cage,and a bird,and a rusty black" );
  318.     print( " rod with a star on the end!" );
  319.     print( " \...Nuts,it won't open." );
  320. }
  321.  
  322. /* Watch TV */
  323.  
  324. examtv()
  325. {
  326.     print( "^It is set to channel 10." );
  327. }
  328.  
  329. wtchtv()
  330. {
  331.     if( wtchct < 5 ) wtchct++;
  332.     switch( wtchct ) {
  333.         case 1 : {
  334.             print( "^There are slanted,almost horizontal " );
  335.             print( "lines on the screen,as though the " );
  336.             print( "set is out of repair.The sound is garbled," );
  337.             print( "apparently a commercial." );
  338.             break;
  339.         }
  340.         case 2 : {
  341.             print( "^The picture has cleared up and now shows " );
  342.             print( "YOU! You are walking across a desert past " );
  343.             print( "an old car." );
  344.             break;
  345.         }
  346.         case 3 : {
  347.             print( "^The screen shows you near a burned-out " );
  348.             print( "place in the desert,crouched over a " );
  349.             print( "crumpled body." );
  350.             break;
  351.         }
  352.         case 4 : {
  353.             print( "^The screen shows you closely examining a " );
  354.             print( "hand,as though there were something odd " );
  355.             print( "about it!" );
  356.             break;
  357.         }
  358.         case 5 : {
  359.             print( "^Th